package com.cjjd.c.feature.home.subservice;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.cjjd.c.R;
import com.cjjd.c.base.ActionBarFragment;
import com.cjjd.c.utils.CommonUtil;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * ----------------------------------
 * Created by xyd on 2017/12/1.
 * <p/>
 * 描  述：预约服务
 * <p/>
 * 修订历史:
 * ----------------------------------
 */

public class SubscribeServiceFragment extends ActionBarFragment {
    @Bind(R.id.lv_current_subscribe)
    ListView lvCurrentSubscribe;
    private CurrentSubscribeAdapter currentSubscribeAdapter;

    @Override
    public Object getTitleString() {
        return "预约服务";
    }

    @Override
    public int getContentView() {
        return R.layout.fragment_subscribe_service;
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View rootView = super.onCreateView(inflater, container, savedInstanceState);
        ButterKnife.bind(this, rootView);
        initView();
        return rootView;
    }


    @Override
    protected void initView() {

        currentSubscribeAdapter = new CurrentSubscribeAdapter(mContext);

        ArrayList<String> strings = new ArrayList<>();
        strings.add("1");
        strings.add("1");
        strings.add("1");
        currentSubscribeAdapter.setData(strings);

        lvCurrentSubscribe.setAdapter(currentSubscribeAdapter);
        CommonUtil.setListViewHeightBasedOnChildren(lvCurrentSubscribe);

    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick({R.id.tv_yyds, R.id.tv_yyfp, R.id.tv_yytf, R.id.tv_yyjc, R.id.tv_jxfw, R.id.tv_ystf, R.id.tv_blxz, R.id.tv_yybx, R.id.tv_yyxy})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.tv_yyds:
                break;
            case R.id.tv_yyfp:
                break;
            case R.id.tv_yytf:
                break;
            case R.id.tv_yyjc:
                break;
            case R.id.tv_jxfw:
                break;
            case R.id.tv_ystf:
                break;
            case R.id.tv_blxz:
                break;
            case R.id.tv_yybx:
                break;
            case R.id.tv_yyxy:
                break;
        }
    }
}
